//
//  SEExamineRecordRefractiveCell.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/14.
//

import UIKit

/// 屈光检查 cell
class SEExamineRecordRefractiveCell: UITableViewCell {

    override func awakeFromNib() {
        super.awakeFromNib()
        backgroundColor = .white
        contentView.backgroundColor = .white
    }
    
    func updateWithViewModel(_ viewModel: SEExamineRecordRefractiveViewModel, _ index: Int) {
        ballmirrorLabel.text = viewModel.examineRecordData(index: index).sph
        pillarmirrorLabel.text = viewModel.examineRecordData(index: index).cyl
        axisLabel.text = viewModel.examineRecordData(index: index).axial
        r1Label.text = viewModel.r1r2(index: index).r1
        r2Label.text = viewModel.r1r2(index: index).r2
        axLabel.text = viewModel.examineRecordData(index: index).ax
    }
    
    @IBOutlet private weak var containerView: UIView! {
        didSet {
            containerView.layer.cornerRadius = 4
            containerView.layer.borderWidth = 1
            containerView.layer.borderColor = Asset.border.color.cgColor
            containerView.layer.masksToBounds = true
        }
    }
    
    @IBOutlet private weak var ballmirrorLabel: UILabel!
    @IBOutlet private weak var pillarmirrorLabel: UILabel!
    @IBOutlet private weak var axisLabel: UILabel!
    @IBOutlet weak var r1Label: UILabel!
    @IBOutlet weak var r2Label: UILabel!
    @IBOutlet weak var axLabel: UILabel!


}
